import { events } from "./base";
import { makeActions } from "@common/utils/eventActionsMaker";
import { init as initGlobalEvents } from "@common/events";
import { QuickMessage } from "@common/models";
import { XHMUser } from "@/ui/meta/entities";

export default {
  ...events,

  Global: initGlobalEvents({ makeActions }),

  Sidebar: {
    Collapse: {
      Set: makeActions<{ collapse: boolean }>("sidebar.collapse.set"),
    },
  },

  QuickMessage: {
    Select: makeActions<{ record: QuickMessage }>("quick-message.select"),
  },

  XHM: {
    USER: {
      LOGIN: makeActions<{ user: XHMUser }>("xhm.user.login"),
    },
  },
};
